package com.jwdf.uda.utils;

import android.content.Context;

import com.jwdf.uda.BuildConfig;
import com.umeng.analytics.MobclickAgent;

/**
 * Created by Administrator on 2016/5/27.
 */
public class StatisticalUtil {

    private static boolean debug = BuildConfig.DEBUG;

    public static void init() {
        MobclickAgent.setDebugMode(debug);
    }

    public static void onPageStart(Context context) {
        MobclickAgent.onResume(context);
    }

    public static void onPageEnd(Context context) {
        MobclickAgent.onPause(context);
    }

    public static void onPageStart(String name) {
        MobclickAgent.onPageStart(name);
    }

    public static void onPageEnd(String name) {
        MobclickAgent.onPageEnd(name);
    }

    public static void onRequestCollocationEvent(Context context, int userId) {
        MobclickAgent.onEvent(context, "event_add_collocation", String.valueOf(userId));
    }
}
